package com.hejielife.workerthread1;

/**
 * 2019年8月2日 下午4:08:18
 * 
 * @author hejielife
 * @despribe WorkerThread
 */
public class WorkerThread extends Thread {
	private final Channel channel;

	public WorkerThread(String name, Channel channel) {
		super(name);
		this.channel = channel;
	}

	public void run() {
		while (true) {
			Request request = channel.takeRequest();
			request.execute();
		}
	}
}
